package com.example.nacos.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

/**
 * 应用配置类
 * 使用 @RefreshScope 注解，支持配置动态刷新
 */
@Data
@Component
@RefreshScope
@ConfigurationProperties(prefix = "app")
public class AppConfig {
    
    private String name;
    private String version;
    private String description;
    private DatabaseConfig database;
    
    @Data
    public static class DatabaseConfig {
        private String url;
        private String username;
        private String password;
    }
}

